import request from '@/utils/request'

// 习题列表
export function query(data) {
  return request({
    url: '/plant/exercise/query',
    method: 'post',
    data
  })
}

// 生成习题
export function generate(data) {
  return request({
    url: '/plant/exercise/generate',
    method: 'post',
    data
  })
}

// 习题详情
export function detail(id) {
  return request({
    url: `/plant/exercise/detail/${id}`,
    method: 'get'
  })
}

// 习题提交
export function submit(data) {
  return request({
    url: `/plant/exercise/submit`,
    method: 'post',
    data
  })
}

// 习题下拉
export function options() {
  return request({
    url: `/plant/dictionary/options`,
    method: 'get'
  })
}
